//
// (c) 2010 Electronic Arts Inc.
//

package org.ttjhome.html.struts.util;

/**
 * Helps you keep track of things that need to be periodically refreshed.
 *
 * @author Steve Clamage
 */
public interface Refreshable
{
	/**
	 * Returns whether it's time for this object to refresh itself.
	 *
	 * @return true if you should refresh yourself now
	 */
	public boolean shouldRefresh();

	/**
	 * Sets the object to be "refreshed" as of this moment.
	 */
	public void refreshed();

	/**
	 * Resets the refresher so that the next call to {@link #shouldRefresh}
	 * will return true.
	 */
	public void reset();
}
